package com.mxpio.erp.common.technology.service;

import com.mxpio.erp.common.enums.OrderStatusEnums;
import com.mxpio.erp.common.technology.entity.BomInfo;
import com.mxpio.erp.common.technology.entity.BomInfoLine;
import com.mxpio.erp.common.technology.vo.BomTreeVO;
import com.mxpio.erp.common.technology.vo.ConsumptionVO;
import com.mxpio.erp.common.technology.vo.VersionVO;
import com.mxpioframework.common.vo.Result;
import com.mxpioframework.jpa.query.Criteria;
import com.mxpioframework.system.service.BaseService;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BomInfoService extends BaseService<BomInfo> {
    Result<BomInfo> updateBomStatus(BomInfo bomInfo, OrderStatusEnums.BomStatus bomStatus);

    BomInfo listBom(String itemCode, VersionVO version);

    List<BomInfo> listHistory(String itemCode);

    Page<BomInfo> page(Pageable page, Criteria c);

    ImmutablePair<String,String> consumption(ConsumptionVO vo);

    List<BomInfo> listByDate(String dateStr);

    void clacAll();

    List<BomInfoLine> listSub(BomTreeVO vo);

}
